/****************************************************************
 *This file is thread-two.c
 ****************************************************************/

#include "include.h"

/****************************************************************
 *This function is thread2
 *	(1)create socket,listen port,process monitor
 ****************************************************************/
void *thread2(void *str)
{
	str = str;
    struct  timeval    get_tv, set_tv;
    struct  timezone   get_tz;

    // get system
    gettimeofday(&get_tv,&get_tz);

    // print time
    printf("tv_sec:%d\n",get_tv.tv_sec);
    printf("tv_usec:%d\n",get_tv.tv_usec);
    printf("tz_minuteswest:%d\n",get_tz.tz_minuteswest);
    printf("tz_dsttime:%d\n",get_tz.tz_dsttime);

/*    set_tv.tv_sec = 1623944986;*/
    /*set_tv.tv_usec = 712;*/
    /*settimeofday(&set_tv,&get_tz);*/

	//get equipment message
	while(1)
	{
        sleep(1);

/*        // get system*/
        /*gettimeofday(&get_tv,&get_tz);*/

        /*// print time*/
        /*printf("tv_sec:%d\n",get_tv.tv_sec);*/
        /*printf("tv_usec:%d\n",get_tv.tv_usec);*/
        /*printf("tz_minuteswest:%d\n",get_tz.tz_minuteswest);*/
        /*printf("tz_dsttime:%d\n",get_tz.tz_dsttime);*/

	}

	return NULL;
}

